﻿@model ComparteTuTiempo.Models.CustomClass.CustomClass
@{
    ViewBag.Title = "Create";
}


<div class="span3">
    <img id="id_img_foto" src="/FicherosSubidos/foto_persona.jpg" class="img-rounded span2">
    <div class="span3">
         @Html.Partial("_UploadFichero")
    </div>
 </div>

<div class="row">
    <h2 class="span5">Registro de Usuario</h2>
</div>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <div class="row">
        <div class="span3">
            <div class="editor-label">
                @Html.LabelFor(model => model.usuario.nombre)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.usuario.nombre)
                @Html.ValidationMessageFor(model => model.usuario.nombre, null, new { @class = "label label-important" })
            </div>
        </div>
        <div class="span3">
            <div class="editor-label">
                @Html.LabelFor(model => model.usuario.apellidos)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.usuario.apellidos)
                @Html.ValidationMessageFor(model => model.usuario.apellidos, null, new { @class = "label label-important" })
            </div>
        </div>
        <div class="span3">
            <div class="editor-label">
                @Html.LabelFor(model => model.usuario.email)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.usuario.email)
                @Html.ValidationMessageFor(model => model.usuario.email, null, new { @class = "label label-important" })
            </div>
        </div>
        <div class="span3" style="display:none;">
                 @Html.TextBoxFor(model => model.usuario.foto)
        </div>
        
    </div>
    <div class="row">
        <div class="span3">
            <legend>Localización</legend>
            <div class="editor-label">
                @Html.LabelFor(model => model.usuario.provincia)
            </div>
            <div class="editor-field">
                @Html.DropDownListFor(model => model.usuario.provincia, ViewBag.provincia as SelectList)
                @Html.ValidationMessageFor(model => model.usuario.provincia)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.usuario.poblacion)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.usuario.poblacion)
                @Html.ValidationMessageFor(model => model.usuario.poblacion, null, new { @class = "label label-important" })
            </div>
        </div>

        <div class="span3">
            <legend>Contacto</legend>
            <div class="editor-label">
                @Html.LabelFor(model => model.usuario.telFijo)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(model => model.usuario.telFijo)
                @Html.ValidationMessageFor(model => model.usuario.telFijo, null, new { @class = "label label-important" })
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.usuario.telMovil)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(model => model.usuario.telMovil)
                @Html.ValidationMessageFor(model => model.usuario.telMovil, null, new { @class = "label label-important" })
            </div>
        </div>
        <div class="span3">
            <legend>Seguridad</legend>
            <div class="editor-label">
                @Html.LabelFor(model => model.pass)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.pass)
                @Html.ValidationMessageFor(model => model.pass, null, new { @class = "label label-important" })
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.passconf)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.passconf)
                @Html.ValidationMessageFor(model => model.passconf, null, new { @class = "label label-important" })
            </div>

            @if (@ViewBag.mensajePass != null)
            {
            
                <div class="row">
                    <div class="alert alert-error span2">
                        <b>@ViewBag.mensajePass</b>
                    </div>
                </div>
            }
        </div>
        <div class="span3">
            <legend>@Html.DisplayNameFor(model => model.usuario.comentario)</legend>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.usuario.comentario, new { @rows = 5 })
                @Html.ValidationMessageFor(model => model.usuario.comentario)
            </div>
        </div>
    </div>
    <div class="row">
        <div class="span3">
            <legend>@Html.DisplayNameFor(model => model.usuario.profesionesusuarios.Last().profesiones)</legend>
            <div class="editor-field">
                @Html.ListBoxFor(model => model.SelectedItemId, ViewBag.profesiones as SelectList, new { style = "width: 300px;height:120px" })
            </div>
        </div>
    </div>
        

    <div class="row">
        <div class="span2">
            <input type="submit" value="Continuar" class="btn" />
        </div>
        <div class="span1">
            @Html.ActionLink("Volver", "Index", "Home", null, new { @class = "btn" })
        </div>
    </div>

}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
